import java.util.ArrayList;
import java.util.List;

public class Test {
        public static void main(String[] args) {
            CardDemo cardDemo=new CardDemo();
            List<Card>cardList=cardDemo.buyCard();
            System.out.println(cardList);
            cardDemo.shuffle(cardList);
            System.out.println(cardList);
            List<List<Card>>ret=cardDemo.play(cardList);
            for (int i = 0; i < ret.size(); i++) {
                System.out.println(ret.get(i));
            }
    }
    public static void main4(String[] args) {
        List<List<Integer>>list=new ArrayList<>();
        List<Integer>list1=new ArrayList<>();
        list1.add(1);
        list1.add(2);
        list.add(list1);

        List<Integer>list2=new ArrayList<>();
        list2.add(11);
        list2.add(21);
        list2.add(31);
        list.add(list2);
        System.out.println(list);

    }
    public static void main3(String[] args) {
        String str1="welcome to bit";
        String str2="come";
        ArrayList<Character>ret=new ArrayList<>();
        for (int i = 0; i <str1.length() ; i++) {
            char ch=str1.charAt(i);
            if(!str2.contains(ch+"")){
                ret.add(ch);
            }
        }
        for (int i = 0; i <ret.size(); i++) {
            System.out.print(ret.get(i));
        }
    }
    public static void main2(String[] args) {
        ArrayList<Integer> test=new ArrayList<>();
        test.add(1);
        test.add(2);
        test.add(3);
        test.add(4);
        test.add(5);
        System.out.println(test);
        List<Integer>list=test.subList(1,3);
        System.out.println(list);
        System.out.println("===============");
        list.set(0,99);
        System.out.println(test);
    }
    public static void main1(String[] args) {
        ArrayList<Integer> test=new ArrayList<>();
        test.add(1);
        test.add(2);
        test.add(3);
        System.out.println(test);
        test.add(1,99);
        System.out.println(test);
        ArrayList<Integer> list=new ArrayList<>();
        list.add(6);
        list.add(6);
        list.add(6);
        test.addAll(list);
        System.out.println(test);
        test.remove(2);
        System.out.println(test);
        test.remove(new Integer(6));
        System.out.println(test);

    }
}
